/**
 * 严肃声明：
 * 开源版本请务必保留此注释头信息，若删除我方将保留所有法律责任追究！
 * 本系统已申请软件著作权，受国家版权局知识产权以及国家计算机软件著作权保护！
 * 可正常分享和学习源码，不得用于违法犯罪活动，违者必究！
 * Copyright (c) 2020 陈尼克 all rights reserved.
 * 版权所有，侵权必究！
 */

import axios from "@/utils/axios";

//登录
export function login(params) {
  let obj = {
    msg: null,
    code: 0,
    data: {
      status: "认证成功",
      token: "ADA59F01A10EF0A733735D7EF6002F42",
      username: "wuzx",
    },
  };
  return new Promise((resolve, reject) => {
    resolve(obj);
  });
  // return axios.post("/api/login", params);
}
//注销
export function logout() {
  return axios.get("/api/logout");
}
//注册
export function register(params) {
  return axios.post("/api/register", params);
}
//获取用户信息
export function getUserInfo() {
  let obj = {
    code: 0,
    msg: null,
    data: {
      objectid: null,
      mobilePhone: "18317515076",
      orgCode: "10001",
      userEmail: "812019152@qq.com",
      userEmailPublic: 1,
      userLocked: "0",
      userName: "吴召欣",
      userSequence: "1",
      userSex: "male",
      userType: "测试1",
      userUid: "wuzx",
      deleteFlag: null,
      isSysuser: null,
      password: null,
    },
  };
  return new Promise((resolve, reject) => {
    resolve(obj);
  });
  // return axios.get("/api/info");
}

export function EditUserInfo(params) {
  return axios.put("/api/info", params);
}
//获取路由列表
export function getroutes() {
  return axios.get("/api/getUserMenu");
}
